package com.estate.struts.actions;

import java.util.Date;

import com.estate.business.LibraryService;
import com.estate.vo.impl.LibraryVo;

public class NewLibraryAction extends EstateSupport {
	
	private String libraryNum;
	private String libraryName;
	private Date buildDate;
	private String deptName;
	private LibraryService libraryService;
	
	public String execute() throws Exception{
		
		LibraryVo libraryVo=new LibraryVo();
		Date date=new Date(System.currentTimeMillis());
		System.out.println(deptName);
		libraryVo.setBuildDate(date);
		libraryVo.setDeptName(deptName);
		libraryVo.setLibraryName(libraryName);
		libraryVo.setLibraryNum(libraryNum);
		libraryService.addLibrary(libraryVo);
		return SUCCESS;
	}

	public void setLibraryName(String libraryName) {
		this.libraryName = libraryName;
	}
	public String getLibraryName() {
		return libraryName;
	}
	public void setBuildDate(Date buildDate) {
		this.buildDate = buildDate;
	}
	public Date getBuildDate() {
		return buildDate;
	}
	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}
	public String getDeptName() {
		return deptName;
	}
	public void setLibraryNum(String libraryNum) {
		this.libraryNum = libraryNum;
	}
	public String getLibraryNum() {
		return libraryNum;
	}

	public void setLibraryService(LibraryService libraryService) {
		this.libraryService = libraryService;
	}

	public LibraryService getLibraryService() {
		return libraryService;
	}

}
